from selenium.webdriver.common.by import By

class SecurityGroupLocator:
      iframe = (By.CSS_SELECTOR, '[id="hj_container"]')
      ## 左上角点击ECS进入产品控制台
      product_list_ecs = (By.XPATH, '//div[@class="columnItem___snCl_"]/div[contains(text(),"Elastic Compute Service")]')
      security_gp_tab= (By.XPATH, "//span[contains(text(),'Security Groups')]")
      #创建安全组按钮
      create_security_group = (By.CSS_SELECTOR, '[type="button"][class="next-btn next-medium next-btn-primary is-hybridcloud"]')
      ##安全组名输入框
      spName_input = (By.CSS_SELECTOR,'[id="SecurityGroupName"]')
      ##submit按钮
      submit_btn = (By.CSS_SELECTOR, '[class="next-btn next-medium next-btn-primary is-hybridcloud"]')
      ##点击展开搜索下拉栏
      search_ele = (By.XPATH, '(//span[@class="next-input next-medium next-select-inner"])[1]')
      ##搜索下拉栏选择第二个
      select_by_name_ele = (By.XPATH, '//div[@class="next-overlay-wrapper opened"]/div/ul/li[2]/div')
      ##搜索输入框
      search_by_name =(By.XPATH, '(//input[@placeholder="Search by security group name"])[1]')
      ##第一个返回的安全组name
      sg_one_ele = (By.XPATH, '(//div[@class="teamix-pro-field-output-description"]/div/span)[1]')



